增加上传速度设置

chengzhenyu 8 年之前
父節點
當前提交
9e881e65aa

+ 6 - 0
app/src/main/java/ai/pai/lensman/utils/Constants.java

@@ -14,4 +14,10 @@ public class Constants {
14 14
     public static final String TMP_DIR_NAME              = "tmp";
15 15
     public static final String APP_PATCH_DIR                  = APP_ROOT_DIR+"/patch";
16 16
 
17
+    public interface UploadIntervalTime{
18
+        int SLOW  = 60;
19
+        int NORMAL = 30;
20
+        int FAST = 10;
21
+    }
22
+
17 23
 }

+ 155 - 91
app/src/main/res/layout/activity_briefs.xml

@@ -66,139 +66,139 @@
66 66
         <LinearLayout
67 67
             android:layout_width="match_parent"
68 68
             android:layout_height="wrap_content"
69
-            android:orientation="vertical"
70
-           >
69
+            android:orientation="vertical">
71 70
 
72 71
             <LinearLayout
73 72
                 android:layout_width="match_parent"
74 73
                 android:layout_height="90dp"
75
-                android:orientation="horizontal"
74
+                android:background="@color/background_white"
76 75
                 android:gravity="center_vertical"
77
-                android:background="@color/background_white">
76
+                android:orientation="horizontal">
78 77
 
79 78
                 <RelativeLayout
80 79
                     android:layout_width="0dp"
81
-                    android:layout_weight="1"
82
-                    android:layout_height="match_parent">
80
+                    android:layout_height="match_parent"
81
+                    android:layout_weight="1">
83 82
 
84 83
                     <TextView
85 84
                         android:id="@+id/tv_today_upload"
86 85
                         android:layout_width="wrap_content"
87 86
                         android:layout_height="wrap_content"
87
+                        android:layout_centerHorizontal="true"
88 88
                         android:layout_marginTop="15dp"
89
+                        android:text="@string/today_capture"
89 90
                         android:textColor="@color/_7B8088"
90
-                        android:textSize="14sp"
91
-                        android:layout_centerHorizontal="true"
92
-                        android:text="@string/today_capture"/>
91
+                        android:textSize="14sp" />
93 92
 
94 93
                     <TextView
95 94
                         android:id="@+id/tv_today_upload_num"
96 95
                         android:layout_width="wrap_content"
97 96
                         android:layout_height="wrap_content"
98 97
                         android:layout_below="@id/tv_today_upload"
98
+                        android:layout_centerHorizontal="true"
99 99
                         android:layout_marginTop="12dp"
100 100
                         android:textColor="@color/_EF4847"
101
-                        android:textSize="22sp"
102
-                        android:layout_centerHorizontal="true"/>
101
+                        android:textSize="22sp" />
103 102
 
104 103
                 </RelativeLayout>
105 104
 
106 105
                 <View
107 106
                     android:layout_width="1px"
108 107
                     android:layout_height="45dp"
109
-                    android:background="@color/text_hint_grey_color"/>
108
+                    android:background="@color/text_hint_grey_color" />
110 109
 
111 110
                 <RelativeLayout
112 111
                     android:layout_width="0dp"
113
-                    android:layout_weight="1"
114
-                    android:layout_height="match_parent">
112
+                    android:layout_height="match_parent"
113
+                    android:layout_weight="1">
115 114
 
116 115
                     <TextView
117 116
                         android:id="@+id/tv_today_point"
118 117
                         android:layout_width="wrap_content"
119 118
                         android:layout_height="wrap_content"
119
+                        android:layout_centerHorizontal="true"
120 120
                         android:layout_marginTop="15dp"
121
+                        android:text="@string/today_incoming"
121 122
                         android:textColor="@color/_7B8088"
122
-                        android:textSize="14sp"
123
-                        android:layout_centerHorizontal="true"
124
-                        android:text="@string/today_incoming"/>
123
+                        android:textSize="14sp" />
125 124
 
126 125
                     <TextView
127 126
                         android:id="@+id/tv_today_point_amount"
128 127
                         android:layout_width="wrap_content"
129 128
                         android:layout_height="wrap_content"
130 129
                         android:layout_below="@id/tv_today_point"
130
+                        android:layout_centerHorizontal="true"
131 131
                         android:layout_marginTop="12dp"
132 132
                         android:textColor="@color/_EF4847"
133
-                        android:textSize="22sp"
134
-                        android:layout_centerHorizontal="true"/>
133
+                        android:textSize="22sp" />
135 134
 
136 135
                 </RelativeLayout>
137 136
 
138 137
             </LinearLayout>
138
+
139 139
             <LinearLayout
140 140
                 android:layout_width="match_parent"
141 141
                 android:layout_height="90dp"
142
-                android:orientation="horizontal"
142
+                android:background="@color/background_white"
143 143
                 android:gravity="center_vertical"
144
-                android:background="@color/background_white">
144
+                android:orientation="horizontal">
145 145
 
146 146
                 <RelativeLayout
147 147
                     android:layout_width="0dp"
148
-                    android:layout_weight="1"
149
-                    android:layout_height="match_parent">
148
+                    android:layout_height="match_parent"
149
+                    android:layout_weight="1">
150 150
 
151 151
                     <TextView
152 152
                         android:id="@+id/tv_week_origin_sold"
153 153
                         android:layout_width="wrap_content"
154 154
                         android:layout_height="wrap_content"
155
+                        android:layout_centerHorizontal="true"
155 156
                         android:layout_marginTop="15dp"
157
+                        android:text="@string/week_origin_sold"
156 158
                         android:textColor="@color/_7B8088"
157
-                        android:textSize="14sp"
158
-                        android:layout_centerHorizontal="true"
159
-                        android:text="@string/week_origin_sold"/>
159
+                        android:textSize="14sp" />
160 160
 
161 161
                     <TextView
162 162
                         android:id="@+id/tv_week_origin_sold_num"
163 163
                         android:layout_width="wrap_content"
164 164
                         android:layout_height="wrap_content"
165 165
                         android:layout_below="@id/tv_week_origin_sold"
166
+                        android:layout_centerHorizontal="true"
166 167
                         android:layout_marginTop="12dp"
167 168
                         android:textColor="@color/_EF4847"
168
-                        android:textSize="22sp"
169
-                        android:layout_centerHorizontal="true"/>
169
+                        android:textSize="22sp" />
170 170
 
171 171
                 </RelativeLayout>
172 172
 
173 173
                 <View
174 174
                     android:layout_width="1px"
175 175
                     android:layout_height="45dp"
176
-                    android:background="@color/text_hint_grey_color"/>
176
+                    android:background="@color/text_hint_grey_color" />
177 177
 
178 178
                 <RelativeLayout
179 179
                     android:layout_width="0dp"
180
-                    android:layout_weight="1"
181
-                    android:layout_height="match_parent">
180
+                    android:layout_height="match_parent"
181
+                    android:layout_weight="1">
182 182
 
183 183
                     <TextView
184 184
                         android:id="@+id/tv_week_point"
185 185
                         android:layout_width="wrap_content"
186 186
                         android:layout_height="wrap_content"
187
+                        android:layout_centerHorizontal="true"
187 188
                         android:layout_marginTop="15dp"
189
+                        android:text="@string/week_point"
188 190
                         android:textColor="@color/_7B8088"
189
-                        android:textSize="14sp"
190
-                        android:layout_centerHorizontal="true"
191
-                        android:text="@string/week_point"/>
191
+                        android:textSize="14sp" />
192 192
 
193 193
                     <TextView
194 194
                         android:id="@+id/tv_week_point_amount"
195 195
                         android:layout_width="wrap_content"
196 196
                         android:layout_height="wrap_content"
197 197
                         android:layout_below="@id/tv_week_point"
198
+                        android:layout_centerHorizontal="true"
198 199
                         android:layout_marginTop="12dp"
199 200
                         android:textColor="@color/_EF4847"
200
-                        android:textSize="22sp"
201
-                        android:layout_centerHorizontal="true"/>
201
+                        android:textSize="22sp" />
202 202
 
203 203
                 </RelativeLayout>
204 204
 
@@ -206,9 +206,9 @@
206 206
 
207 207
             <LinearLayout
208 208
                 android:id="@+id/layout_message_part"
209
-                android:layout_marginTop="8dp"
210 209
                 android:layout_width="match_parent"
211 210
                 android:layout_height="wrap_content"
211
+                android:layout_marginTop="8dp"
212 212
                 android:background="@color/background_white"
213 213
                 android:orientation="vertical">
214 214
 
@@ -221,11 +221,10 @@
221 221
                         android:layout_width="wrap_content"
222 222
                         android:layout_height="wrap_content"
223 223
                         android:layout_gravity="center_vertical"
224
-                        android:text="@string/message"
225 224
                         android:paddingLeft="10dp"
225
+                        android:text="@string/message"
226 226
                         android:textColor="@color/_7B8088"
227
-                        android:textSize="14sp"
228
-                        />
227
+                        android:textSize="14sp" />
229 228
                 </LinearLayout>
230 229
 
231 230
             </LinearLayout>
@@ -233,68 +232,138 @@
233 232
             <View
234 233
                 android:layout_width="match_parent"
235 234
                 android:layout_height="1px"
236
-                android:background="@color/text_hint_grey_color"/>
235
+                android:background="@color/text_hint_grey_color" />
237 236
 
238 237
             <LinearLayout
239 238
                 android:layout_width="match_parent"
240 239
                 android:layout_height="44dp"
241
-                android:paddingLeft="10dp"
242
-                android:paddingRight="6dp"
243 240
                 android:background="@color/background_white"
244
-                android:orientation="horizontal">
241
+                android:orientation="horizontal"
242
+                android:paddingLeft="10dp"
243
+                android:paddingRight="6dp">
245 244
 
246 245
                 <TextSwitcher
247 246
                     android:id="@+id/switcher_system_msg"
248 247
                     android:layout_width="0dp"
249
-                    android:inAnimation="@android:anim/slide_in_left"
250
-                    android:outAnimation="@android:anim/slide_out_right"
251 248
                     android:layout_height="wrap_content"
252 249
                     android:layout_gravity="center_vertical"
253
-                    android:layout_weight="1"/>
250
+                    android:layout_weight="1"
251
+                    android:inAnimation="@android:anim/slide_in_left"
252
+                    android:outAnimation="@android:anim/slide_out_right" />
254 253
 
255 254
                 <ImageView
256 255
                     android:layout_width="10dp"
257 256
                     android:layout_height="18dp"
258 257
                     android:layout_gravity="center_vertical"
259
-                    android:src="@drawable/arrow_right"/>
258
+                    android:src="@drawable/arrow_right" />
260 259
 
261 260
             </LinearLayout>
262 261
 
263 262
             <View
264 263
                 android:layout_width="match_parent"
265 264
                 android:layout_height="1px"
266
-                android:background="@color/text_hint_grey_color"/>
265
+                android:background="@color/text_hint_grey_color" />
267 266
 
268 267
             <LinearLayout
269 268
                 android:layout_width="match_parent"
270 269
                 android:layout_height="44dp"
271
-                android:paddingLeft="10dp"
272
-                android:paddingRight="6dp"
273 270
                 android:background="@color/background_white"
274
-                android:orientation="horizontal">
271
+                android:orientation="horizontal"
272
+                android:paddingLeft="10dp"
273
+                android:paddingRight="6dp">
275 274
 
276 275
                 <TextSwitcher
277 276
                     android:id="@+id/switcher_order_msg"
278 277
                     android:layout_width="0dp"
279 278
                     android:layout_height="wrap_content"
280
-                    android:inAnimation="@android:anim/slide_in_left"
281
-                    android:outAnimation="@android:anim/slide_out_right"
282 279
                     android:layout_gravity="center_vertical"
283
-                    android:layout_weight="1"/>
280
+                    android:layout_weight="1"
281
+                    android:inAnimation="@android:anim/slide_in_left"
282
+                    android:outAnimation="@android:anim/slide_out_right" />
284 283
 
285 284
                 <ImageView
286 285
                     android:layout_width="10dp"
287 286
                     android:layout_height="18dp"
288 287
                     android:layout_gravity="center_vertical"
289
-                    android:src="@drawable/arrow_right"/>
288
+                    android:src="@drawable/arrow_right" />
290 289
 
291 290
             </LinearLayout>
292 291
 
293 292
             <LinearLayout
294
-                android:id="@+id/layout_box_part"
293
+                android:id="@+id/layout_upload_part"
294
+                android:layout_width="match_parent"
295
+                android:layout_height="wrap_content"
295 296
                 android:layout_marginTop="8dp"
297
+                android:background="@color/background_white"
298
+                android:orientation="vertical">
299
+
300
+                <LinearLayout
301
+                    android:layout_width="match_parent"
302
+                    android:layout_height="32dp"
303
+                    android:orientation="horizontal">
304
+
305
+                    <TextView
306
+                        android:layout_width="wrap_content"
307
+                        android:layout_height="wrap_content"
308
+                        android:layout_gravity="center_vertical"
309
+                        android:paddingLeft="10dp"
310
+                        android:text="@string/upload_setting"
311
+                        android:textColor="@color/_7B8088"
312
+                        android:textSize="14sp" />
313
+                </LinearLayout>
314
+
315
+                <View
316
+                    android:layout_width="match_parent"
317
+                    android:layout_height="1px"
318
+                    android:background="@color/text_hint_grey_color" />
319
+
320
+                <RadioGroup
321
+                    android:id="@+id/rg_upload_settings"
322
+                    android:layout_width="match_parent"
323
+                    android:layout_height="44dp"
324
+                    android:orientation="horizontal"
325
+                    android:gravity="center">
326
+
327
+                    <RadioButton
328
+                        android:id="@+id/rb_upload_fast"
329
+                        android:layout_width="wrap_content"
330
+                        android:layout_height="wrap_content"
331
+                        android:layout_marginLeft="10dp"
332
+                        android:layout_marginRight="10dp"
333
+                        android:textColor="@color/dark_grey"
334
+                        android:textSize="16sp"
335
+                        android:text="@string/upload_fast"/>
336
+
337
+                    <RadioButton
338
+                        android:id="@+id/rb_upload_normal"
339
+                        android:checked="true"
340
+                        android:layout_width="wrap_content"
341
+                        android:layout_height="wrap_content"
342
+                        android:layout_marginLeft="10dp"
343
+                        android:layout_marginRight="10dp"
344
+                        android:textColor="@color/dark_grey"
345
+                        android:textSize="16sp"
346
+                        android:text="@string/upload_normal"/>
347
+
348
+
349
+                    <RadioButton
350
+                        android:id="@+id/rb_upload_slow"
351
+                        android:layout_width="wrap_content"
352
+                        android:layout_height="wrap_content"
353
+                        android:layout_marginLeft="10dp"
354
+                        android:layout_marginRight="10dp"
355
+                        android:textColor="@color/dark_grey"
356
+                        android:textSize="16sp"
357
+                        android:text="@string/upload_slow"/>
358
+                </RadioGroup>
359
+
360
+            </LinearLayout>
361
+
362
+            <LinearLayout
363
+                android:id="@+id/layout_box_part"
296 364
                 android:layout_width="match_parent"
297 365
                 android:layout_height="wrap_content"
366
+                android:layout_marginTop="8dp"
298 367
                 android:background="@color/background_white"
299 368
                 android:orientation="vertical">
300 369
 
@@ -307,17 +376,16 @@
307 376
                         android:layout_width="wrap_content"
308 377
                         android:layout_height="wrap_content"
309 378
                         android:layout_gravity="center_vertical"
310
-                        android:text="@string/box_setting"
311 379
                         android:paddingLeft="10dp"
380
+                        android:text="@string/box_setting"
312 381
                         android:textColor="@color/_7B8088"
313
-                        android:textSize="14sp"
314
-                        />
382
+                        android:textSize="14sp" />
315 383
                 </LinearLayout>
316 384
 
317 385
                 <View
318 386
                     android:layout_width="match_parent"
319 387
                     android:layout_height="1px"
320
-                    android:background="@color/text_hint_grey_color"/>
388
+                    android:background="@color/text_hint_grey_color" />
321 389
 
322 390
                 <LinearLayout
323 391
                     android:layout_width="match_parent"
@@ -328,29 +396,27 @@
328 396
                         android:layout_width="wrap_content"
329 397
                         android:layout_height="wrap_content"
330 398
                         android:layout_gravity="center_vertical"
331
-                        android:text="@string/box_no"
332 399
                         android:paddingLeft="10dp"
400
+                        android:text="@string/box_no"
333 401
                         android:textColor="@color/dark_grey"
334
-                        android:textSize="16sp"
335
-                        />
402
+                        android:textSize="16sp" />
336 403
 
337 404
                     <TextView
338 405
                         android:id="@+id/tv_box_num"
339 406
                         android:layout_width="0dp"
340
-                        android:layout_weight="1"
341 407
                         android:layout_height="match_parent"
408
+                        android:layout_weight="1"
342 409
                         android:gravity="center_vertical|right"
343
-                        android:text="SN89757"
344 410
                         android:paddingRight="10dp"
411
+                        android:text="SN89757"
345 412
                         android:textColor="@color/grey"
346
-                        android:textSize="14sp"
347
-                        />
413
+                        android:textSize="14sp" />
348 414
                 </LinearLayout>
349 415
 
350 416
                 <View
351 417
                     android:layout_width="match_parent"
352 418
                     android:layout_height="1px"
353
-                    android:background="@color/text_hint_grey_color"/>
419
+                    android:background="@color/text_hint_grey_color" />
354 420
 
355 421
                 <LinearLayout
356 422
                     android:layout_width="match_parent"
@@ -361,32 +427,30 @@
361 427
                         android:layout_width="wrap_content"
362 428
                         android:layout_height="wrap_content"
363 429
                         android:layout_gravity="center_vertical"
364
-                        android:text="@string/box_status"
365 430
                         android:paddingLeft="10dp"
431
+                        android:text="@string/box_status"
366 432
                         android:textColor="@color/dark_grey"
367
-                        android:textSize="16sp"
368
-                        />
433
+                        android:textSize="16sp" />
369 434
 
370 435
                     <TextView
371 436
                         android:id="@+id/tv_box_status"
372 437
                         android:layout_width="0dp"
373
-                        android:layout_weight="1"
374 438
                         android:layout_height="match_parent"
439
+                        android:layout_weight="1"
375 440
                         android:gravity="center_vertical|right"
376
-                        android:text="@string/connected_device"
377 441
                         android:paddingRight="10dp"
442
+                        android:text="@string/connected_device"
378 443
                         android:textColor="@color/grey"
379
-                        android:textSize="14sp"
380
-                        />
444
+                        android:textSize="14sp" />
381 445
                 </LinearLayout>
382 446
 
383 447
             </LinearLayout>
384 448
 
385 449
             <LinearLayout
386 450
                 android:id="@+id/layout_price_part"
387
-                android:layout_marginTop="8dp"
388 451
                 android:layout_width="match_parent"
389 452
                 android:layout_height="wrap_content"
453
+                android:layout_marginTop="8dp"
390 454
                 android:background="@color/background_white"
391 455
                 android:orientation="vertical">
392 456
 
@@ -394,15 +458,15 @@
394 458
                     android:id="@+id/layout_price_setting"
395 459
                     android:layout_width="match_parent"
396 460
                     android:layout_height="44dp"
397
-                    android:paddingRight="6dp"
398
-                    android:orientation="horizontal">
461
+                    android:orientation="horizontal"
462
+                    android:paddingRight="6dp">
399 463
 
400 464
                     <TextView
401 465
                         android:layout_width="wrap_content"
402 466
                         android:layout_height="wrap_content"
403 467
                         android:layout_gravity="center_vertical"
404
-                        android:text="@string/price_manage"
405 468
                         android:paddingLeft="10dp"
469
+                        android:text="@string/price_manage"
406 470
                         android:textColor="@color/dark_grey"
407 471
                         android:textSize="16sp" />
408 472
 
@@ -411,47 +475,47 @@
411 475
                         android:layout_width="0dp"
412 476
                         android:layout_height="wrap_content"
413 477
                         android:layout_gravity="center_vertical"
414
-                        android:text="@string/price_manage"
478
+                        android:layout_weight="1"
415 479
                         android:paddingLeft="10dp"
480
+                        android:text="@string/price_manage"
416 481
                         android:textColor="@color/grey"
417
-                        android:textSize="14sp"
418
-                        android:layout_weight="1"/>
482
+                        android:textSize="14sp" />
419 483
 
420 484
                     <ImageView
421 485
                         android:layout_width="10dp"
422 486
                         android:layout_height="18dp"
423 487
                         android:layout_gravity="center_vertical"
424
-                        android:src="@drawable/arrow_right"/>
488
+                        android:src="@drawable/arrow_right" />
425 489
 
426 490
                 </LinearLayout>
427 491
 
428 492
                 <View
429 493
                     android:layout_width="match_parent"
430 494
                     android:layout_height="1px"
431
-                    android:background="@color/text_hint_grey_color"/>
495
+                    android:background="@color/text_hint_grey_color" />
432 496
 
433 497
                 <LinearLayout
434 498
                     android:id="@+id/layout_price_introduction"
435 499
                     android:layout_width="match_parent"
436 500
                     android:layout_height="44dp"
437
-                    android:paddingRight="6dp"
438
-                    android:orientation="horizontal">
501
+                    android:orientation="horizontal"
502
+                    android:paddingRight="6dp">
439 503
 
440 504
                     <TextView
441 505
                         android:layout_width="0dp"
442 506
                         android:layout_height="wrap_content"
443 507
                         android:layout_gravity="center_vertical"
444
-                        android:text="@string/platform_price_rule"
508
+                        android:layout_weight="1"
445 509
                         android:paddingLeft="10dp"
510
+                        android:text="@string/platform_price_rule"
446 511
                         android:textColor="@color/dark_grey"
447
-                        android:textSize="16sp"
448
-                        android:layout_weight="1"/>
512
+                        android:textSize="16sp" />
449 513
 
450 514
                     <ImageView
451 515
                         android:layout_width="10dp"
452 516
                         android:layout_height="18dp"
453 517
                         android:layout_gravity="center_vertical"
454
-                        android:src="@drawable/arrow_right"/>
518
+                        android:src="@drawable/arrow_right" />
455 519
 
456 520
                 </LinearLayout>
457 521
 

+ 6 - 0
app/src/main/res/values/strings.xml

@@ -165,4 +165,10 @@
165 165
     <string name="can_not_delete">该照片已在上传队列,无法删除</string>
166 166
 
167 167
     <string name="sdcard_fail">手机sd卡错误</string>
168
+
169
+    <string name="upload_setting">上传延时设置</string>
170
+
171
+    <string name="upload_slow">长</string>
172
+    <string name="upload_normal">中</string>
173
+    <string name="upload_fast">短</string>
168 174
 </resources>